package com.kaishengit.action;

import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;

import com.kaishengit.servic.StatisticsTimeServic;
import com.opensymphony.xwork2.Action;

public class StatisticsTimerAction implements Action {
	StatisticsTimeServic sts = new StatisticsTimeServic();
	private String json;

	public String execute() throws Exception {
		@SuppressWarnings("unchecked")
		Map<String, List<Long>> map = (Map<String, List<Long>>) ServletActionContext
				.getContext().getSession().get("StatisticsTimerList");
		
		json = sts.convertJSON(map);
		return SUCCESS;
	}

	public String getJson() {
		return json;
	}

	public void setJson(String json) {
		this.json = json;
	}

}
